.so ../bk-macros
.TH "bk config" "\*[BKVER]" %E% "\*(BC" "\*(UM"
.SH NAME
bk config \- show repository configuration information
.SH SYNOPSIS
.B bk config
.[B] \-v
.SH DESCRIPTION
.LP
The
.B bk config
command displays configuration information, consisting of
key-value pairs, associated with a \*(BK repository.
.LP
Repository configuration information is searched for in the following 
places, in order:
.TP "\fB`bk root -P`/BitKeeper/etc/config\fP "
.B \`bk\ root\`/BitKeeper/etc/config
This repository's config file
.tp
.B \`bk\ root -P\`/BitKeeper/etc/config
Product repository config file
.tp
.B \`bk\ dotbk\`/config
Personal config file
.tp
.B /etc/BitKeeper/etc/config
Per-machine config file
.tp
.B \`bk\ bin\`/config
Per-installation config file
.tp
.B \`bk\ root\`/BitKeeper/log/config
This repository's config file
.tp
.B \`bk\ root -P\`/BitKeeper/log/config
Product repository config file
.tp
.V $BK_CONFIG
Environment variable
.LP
The
.B BitKeeper/etc/config
file is version controlled, the
.B BitKeeper/log/config
file is not.
Having two gives you a way to have repository specific values that
do not propagate.
.LP
For each key-value pair, the first instance of a key found is used.
You can override an earlier value with a later value, however, by
appending an exclamation point to the value (not the key):
.DS
checkout: get!
.DE
If multiple instances of a key value are found with this trailing
exclamation point, the last such value found is used.
.LP
The
.B BK_CONFIG
environment variable may contain a list of
.ARGc key
.OPTreq : value
pairs separated by semicolons.
For example:
.DS
BK_CONFIG=key1:value1;key2:value2;key3:value3
.DE
.LP
For each repository, the various sources of configuration data
collectively must specify values for at least the following keys:
.DS
description:
email:
.DE
(See
"CONFIG FILE ENTRIES" in
.B bk help config-etc
for allowed values.)
.LP
You can specify a default config file to make setup easier
and more consistent for every repository on the system by creating
a template in
.BR "\`bk dotbk\`/config.template" ,
.BR /etc/BitKeeper/etc/config.template ,
or
.BR "\`bk bin\`/config.template" .
If any of those files exists,
.B bk setup
automatically uses the keys in the first one found as the 
.B BitKeeper/etc/config
file.
See
.B bk help setup
for more information.
.SH OPTIONS
.TP
.B \-v
Displays the location of all config key-value pairs in the current
configuration.
This allows you to determine which config file is controlling each
item in your configuration.
Items that are
.I not
being used because they are preceded or overridden by other values
are shown with a leading pound sign (`#').
This is useful for debugging your configuration.
.SH EXAMPLES
Suppose a user is trying to determine why his keywords are not being expanded
as desired, even though he has put it in
.V $BK_CONFIG .
.Q bk config \-v
shows that the his personal config file value for
.Q keyword
is taking precedence over that in
.V $BK_CONFIG .
.DS
$ bk config -v
/repos/fred/testrepo/BitKeeper/etc/config:
#	autofix:        no
	description:    Fred's Test repository
#	keyword:        sccs

/home/fred/.bk/config:
	keyword:        rcs!

/etc/BitKeeper/etc/config:

/usr/local/bitkeeper/config:

$BK_CONFIG:
	autofix:        yes!
#	keyword:        sccs
.DE
.LP
The output also shows that the
.B autofix
value in
.V $BK_CONFIG
is overriding the corresponding value in the repository config file
because the exclamation mark is appended.
.SH "SEE ALSO"
.SA config-etc
.SA config-gui
.SH CATEGORY
.B Admin
